#默认带有抗性提升
effect give @a[tag=zuoxu] resistance 1 0 true
#武器技能：【超时空利刃】
execute as @a[tag=zuoxu,scores={skIron_sword0=2..}] at @s run function nw:yingxiong/2yingxiong/03zuoxu/skill/0beidong



#主动技能【定位坐标】
execute as @a[tag=zuoxu,scores={skPearl=1..}] at @s run function nw:yingxiong/2yingxiong/03zuoxu/skill/01dingweizuobiao
#主动技能【定位坐标】CD
execute as @a[tag=zuoxu,scores={skCDPearl=0}] at @s run function nw:yingxiong/2yingxiong/03zuoxu/skill/01dingweizuobiao_cd


#主动技能【响应坐标】
execute as @a[tag=zuoxu,scores={skEXBottle=1..},limit=1] at @s if score @e[type=armor_stand,tag=zuoxuZuobiao,limit=1] DataID = @s DataID run function nw:yingxiong/2yingxiong/03zuoxu/skill/02xiangying
execute as @a[tag=zuoxu,scores={skEXBottle=1..}] run scoreboard players set @s skCDEXBottle 5
execute as @a[tag=zuoxu,scores={skEXBottle=1..}] run scoreboard players set @s skEXBottle 0
#主动技能【响应坐标】CD
execute as @a[tag=zuoxu,scores={skCDEXBottle=0}] at @s run function nw:yingxiong/2yingxiong/03zuoxu/skill/02xiangying_cd


#被动技能【坐标】
execute as @e[type=armor_stand,tag=zuoxuZuobiao] at @s run scoreboard players set @a[tag=!zuoxu,distance=0..4,gamemode=!spectator,scores={EFLocks=0}] EFLocks 5
execute as @e[type=armor_stand,tag=zuoxuZuobiao] at @s run scoreboard players set @a[tag=!zuoxu,distance=0..4,gamemode=!spectator,scores={EFLocks=..-1}] EFLocks -5

execute as @e[type=armor_stand,tag=zuoxuZuobiao] at @s run scoreboard players set @a[tag=zuoxu,distance=0..4,gamemode=!spectator,scores={EFUnControl=0}] EFUnControl 5
execute as @e[type=armor_stand,tag=zuoxuZuobiao] at @s run scoreboard players set @a[tag=zuoxu,distance=0..4,gamemode=!spectator,scores={EFUnControl=..-1}] EFUnControl -5
#被动技能【坐标】特效
execute at @e[type=armor_stand,tag=zuoxuZuobiao] run particle minecraft:composter ~ ~-0.6 ~ 0.2 0.3 0.2 0.01 1 normal @a
execute at @e[type=armor_stand,tag=zuoxuWeixing] run particle minecraft:enchant ~ ~-0.6 ~ 0.3 0.5 0.3 0.1 2 normal @a



#被动技能【生成微型坐标】
execute as @a[tag=zuoxu,scores={skShouShang1=40..,skCDEgg=0}] at @s run summon minecraft:armor_stand ~ ~1 ~ {Tags:[zuoxuWeixing],Marker:1b,CustomName:'[{"text":"微型坐标","color":"green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]',CustomNameVisible:1b,Invisible:1,ShowArms:1,DisabledSlots:65793,Rotation:[0f]}
execute as @a[tag=zuoxu,scores={skShouShang1=40..,skCDEgg=0}] at @s run scoreboard players operation @e[type=armor_stand,tag=zuoxuWeixing,distance=0..2] DataID = @s DataID
execute as @a[tag=zuoxu,scores={skShouShang1=40..,skCDEgg=0}] run scoreboard players set @s skCDEgg 3
execute as @a[tag=zuoxu,scores={skShouShang1=1..}] run scoreboard players set @s skShouShang1 0
#[微型坐标]2格范围内有敌人时自毁
execute as @e[type=armor_stand,tag=zuoxuWeixing] if entity @a[distance=0..2,tag=!zuoxu] run function nw:yingxiong/2yingxiong/03zuoxu/skill/03weixingkill

execute as @a[tag=zuoxu] run title @s actionbar [{"text":"定位坐标","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDPearl","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 响应坐标","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEXBottle","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":" 微型坐标","color":"dark_red","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"正在冷却：","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"skCDEgg","name":"@s"},"color":"aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"s","color":"gold","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false}]
